﻿using UnityEngine;

public class Main : MonoBehaviour
{
    private void Awake()
    {
        ProgramManager.Instance.Initialze();
        ProgramManager.Instance.Preload();
    }

    private void Start()
    {
        ProgramManager.Instance.Load();
    }

    private void Update()
    {
        ProgramManager.Instance.Tick();
    }

    private void LateUpdate()
    {
        ProgramManager.Instance.LateTick();
    }

    private void OnPreRender()
    {
        ProgramManager.Instance.PreRender();
    }

    private void OnPostRender()
    {
        ProgramManager.Instance.PostRender();
    }

    private void OnRenderImage(RenderTexture source, RenderTexture destination)
    {
        ProgramManager.Instance.RenderImage(source, destination);
    }

    private void OnDestroy()
    {
        ProgramManager.Instance.Uninitialize();
    }
}
